const db = require('../DBcofig/DBConnection')
module.exports = {
    //查询所有餐桌
    setTable(res, sql, arr) {
        return new Promise((resolve, reject) => {
            db.dbconfig(res, sql, arr, function (data) {
                if (data != null) {
                    resolve({
                        code: 200,
                        msg: '查询成功',
                        data
                    })
                }
                reject({
                    code: 400,
                    msg: '查询失败'
                })

            })
        })

    }
}